package com.sgb.kjwl.view.ui.adapter.self.pick;

import android.content.Context;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.user.ProjectDetailedListEntity;
import com.sgb.kjwl.model.entity.user.UserMaterialEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class UserMaterialAdapter extends BaseRecycleAdapter<UserMaterialEntity> {

    public UserMaterialAdapter(Context context, List<UserMaterialEntity> datas) {
        super(context, R.layout.item_user_material, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, final UserMaterialEntity entity) {
        holder.setBinding(BR.viewModel, entity);
    }

    private UserMaterialAdapter.onEditClickListener editClickListener;

    public void setonEditClick(UserMaterialAdapter.onEditClickListener editClickListener) {
        this.editClickListener = editClickListener;
    }

    public interface onEditClickListener {
        void onDetailedListClick(UserMaterialEntity entity, int position);
    }
}
